package com.bigfreakindeals.Adapters;

import java.util.ArrayList;
import java.util.List;

import android.content.Context;
import android.graphics.drawable.Drawable;
import android.util.Log;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ArrayAdapter;
import android.widget.BaseAdapter;
import android.widget.ImageView;
import android.widget.TextView;

import com.bigfreakindeals.R;
import com.bigfreakindeals.Models.*;
public class DealListAdapter extends BaseAdapter{

	
	
        private List<ActiveDeal> items;
        private Context mContext;
        ImageView icon;
		TextView title;
	
        public DealListAdapter(Context context, int textViewResourceId, List<ActiveDeal> dealList) {
                this.items = dealList;
                this.mContext = context;
                notifyDataSetChanged();
        }

        @Override
        public View getView(int position, View convertView, ViewGroup parent) {
               	final LayoutInflater inflater = (LayoutInflater) mContext.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
				convertView = inflater.inflate(R.layout.contextmenu_item,null);
    			ActiveDeal deal = ((ActiveDeal)items.get(position));
    		    ((TextView) convertView.findViewById(R.id.contextmenu_title)).setText(deal.getDealName());
    		    ((ImageView) convertView.findViewById(R.id.contextenu_thumbnail)).setImageBitmap(deal.thumbPromoImage);
    		return convertView;

    				
        }

		@Override
		public int getCount() {
			// TODO Auto-generated method stub
			return 0;
		}

		@Override
		public Object getItem(int position) {
			// TODO Auto-generated method stub
			return null;
		}

		@Override
		public long getItemId(int position) {
			// TODO Auto-generated method stub
			return 0;
		}

}
